package http;

import android.util.SparseArray;

/**
 * Created by jwaoo on 2017/10/18.
 */

public final class HttpCode {


    public final static int ERROR_NOT_VERIFIED = 1035;
    public final static int ERROR_TOKEN_VALID = 1062;
    public final static int BAD_REQUEST = 400;
    public final static int HTTP_SUCCESS = 200;
    public final static int REQUEST_SUCCESS = 1000;
    private static SparseArray<String> httpCodeMap;

    public final static void setHttpCodeMap(SparseArray sparseArray){
        httpCodeMap = sparseArray;
    }

    public final static String getHttpErrorMsg(int errorCode){
        if (httpCodeMap != null && httpCodeMap.size() > 0) return httpCodeMap.get(errorCode);
        return "";
    }


}
